﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers">

    

    
    <Style  TargetType="{x:Type SF_Helpers:PanelLayout}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type SF_Helpers:PanelLayout}">
                    <Grid Margin="25,0,10,0">
                        <Grid.InputBindings>
                            <KeyBinding Key="Esc" Command="{Binding CloseWindowCommand}" />
                        </Grid.InputBindings>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>




                        <TextBlock 
                            Grid.Row="1" Text="{TemplateBinding Title}" Style="{StaticResource PanelMainTitle}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" />

                        <ContentPresenter Grid.Row="1" Content="{TemplateBinding Toolbar}" Margin="0,3,0,0" />

                        <TextBlock Grid.Row="0" HorizontalAlignment="Left" Margin="0,3,0,3"
                                   Text="{Binding Model.WindowTitle, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
                                   Style="{StaticResource PanelSubTitle}" />

                        <ContentPresenter Grid.Row="2" Content="{TemplateBinding Content}" Margin="0,5,0,0" />
                        
                        
                            
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

  


    
</ResourceDictionary>